The present invention relates to an echo canceller and an echo canceling method.
Conventionally, an echo canceller for estimating an echo flowing through a speech path and subtracting the echo from an echo signal fed to the speech path to cancel the echo has been known. The echo is estimated by learning a filter coefficient of a filter for generating an echo replica signal (a pseudo echo signal) In such an echo canceller, an accurate filter coefficient cannot be learned at the time of a double-talk (two-way simultaneous speech communication). Accordingly, the learning of the filter coefficient is stopped at the time of the double-talk.
In such an echo canceller, however, there is a time lag from the time when a double-talk state actually occurs to the time when the double-talk state is detected, and the filter coefficient is learned during the time lag. In such a period, therefore, an accurate filter coefficient cannot be obtained.
When the learning of the filter coefficient is stopped in a case where the double-talk state occurs, the learning of the filter coefficient must be started from the beginning when the double-talk state is released. Accordingly, the convergence of the learning is delayed.
An echo canceller for alternately storing a filter coefficient obtained by learning in two memories, stopping the learning and using a filter coefficient in a memory different from a memory storing a filter coefficient currently used to generate an echo replica signal has been developed when a double-talk state is detected (see JP-A8-265222).
When the double-talk detection precision is degraded, however, a filter coefficient having a high degree of error at the time of detecting the double-talk state may be also used in the above-mentioned method.
An object of the present invention is to provide an echo canceller and an echo canceling method capable of generating an echo replica signal using a filter coefficient having a low degree of error at the time of detecting a double-talk state in a case where the double-talk detection precision is degraded and a case where the learning of the filter coefficient swings by noises.
A first echo canceller according to the present invention is characterized by comprising means for storing in first storage means the newest filter coefficient obtained by learning means for learning a filter coefficient for producing an echo replica by an adaptive filter; means for calculating, every time the learning is performed for a predetermined time period by the learning means, a backup filter coefficient on the basis of the newest filter coefficient obtained by the learning and storing the obtained backup filter coefficient in second storage means; first echo cancellation means for producing an echo replica on the basis of the filter coefficient stored in the first storage means and canceling an echo on the basis of the produced echo replica; second echo cancellation means for producing an echo replica on the basis of the filter coefficient stored in the second storage means and canceling an echo on the basis of the produced echo replica; means for detecting a double-talk state; means for selecting and outputting an output signal obtained by the first echo cancellation means when the double-talk state is not detected; and means for stopping the learning by the learning means, storing in the first storage means the filter coefficient stored in the second storage means, and selecting and outputting an output signal obtained by the second echo cancellation means when the double-talk state is detected, and in that the backup filter coefficient is calculated by adding a predetermined weighting factor times the filter coefficient obtained by the learning and a predetermined weighting factor times the preceding backup filter coefficient stored in the second storage means.
A second echo canceller according to the present invention is characterized by comprising means for storing in first storage means the newest filter coefficient obtained by learning means for learning a filter coefficient for producing an echo replica by an adaptive filter; means for calculating, every time the learning is performed for a predetermined time period by the learning means, a backup filter coefficient on the basis of the newest filter coefficient obtained by the learning and storing the obtained backup filter coefficient in second storage means; first echo cancellation means for producing an echo replica on the basis of the filter coefficient stored in the first storage means and canceling an echo on the basis of the produced echo replica; second echo cancellation means for producing an echo replica on the basis of the filter coefficient stored in the second storage means and canceling an echo on the basis of the produced echo replica; means for detecting a state where there is a possibility of a double-talk; means for detecting a double-talk state when the state where there is a possibility of a double-talk is continued for a predetermined time period; means for selecting and outputting an output signal obtained by the first echo cancellation means when the double-talk state is not detected;means for selecting and outputting an output signal obtained by the second echo cancellation means when the state where there is a possibility of a double-talk is detected; and means for stopping the learning by the learning means, storing in the first storage means the filter coefficient stored in the second storage means, and selecting and outputting an output signal obtained by the second echo cancellation means when the double-talk state is detected.
It is preferable that the backup filter coefficient is calculated by adding a predetermined weighting factor times the filter coefficient obtained by the learning and a predetermined weighting factor times the preceding backup filter coefficient stored in the second storage means.
A first echo canceling method according to the present invention is characterized by comprising the steps of storing in first storage means the newest filter coefficient obtained by learning means for learning a filter coefficient for producing an echo replica by an adaptive filter; calculating, every time the learning is performed for a predetermined time period by the learning means, a backup filter coefficient on the basis of the newest filter coefficient obtained by the learning and storing the obtained backup filter coefficient in second storage means; detecting a double-talk state; producing an echo replica on the basis of the filter coefficient stored in the first storage means and canceling an echo on the basis of the produced echo replica when the double-talk state is not detected; and stopping the learning by the learning means, storing in the first storage means the filter coefficient stored in the second storage means, producing an echo replica on the basis of the filter coefficient stored in the second storage means, and canceling an echo on the basis of the produced echo replica when the double-talk state is detected, and is characterized in that the backup filter coefficient is calculated by adding a predetermined weighting factor times the filter coefficient obtained by the learning and a predetermined weighting factor times the preceding backup filter coefficient stored in the second storage means.
A second echo canceling method according to the present invention is characterized by comprising the steps of storing in first storage means the newest filter coefficient obtained by learning means for learning a filter coefficient for producing an echo replica by an adaptive filter; calculating, every time the learning is performed for a predetermined time period by the learning means, a backup filter coefficient on the basis of the newest filter coefficient obtained by the learning and storing the obtained backup filter coefficient in second storage means; detecting a state where there is a possibility of a double-talk; detecting a double-talk state when the state where there is a possibility of a double-talk is continued for a predetermined time period; producing an echo replica on the basis of the filter coefficient stored in the first storage means and canceling an echo on the basis of the produced echo replica when the state where there is a possibility of a double-talk and the double-talk state are not detected; producing an echo replica on the basis of the filter coefficient stored in the second storage means and canceling an echo on the basis of the produced echo replica when the state where there is a possibility of a double-talk is detected; and stopping the learning by the learning means, storing in the first storage means the filter coefficient stored in the second storage means, and producing an echo replica on the basis of the filter coefficient stored in the second storage means, and canceling an echo on the basis of the produced echo replica when the double-talk state is detected.
It is preferable that the backup filter coefficient is calculated by adding a predetermined weighting factor times the filter coefficient obtained by the learning and a predetermined weighting factor times the preceding backup filter coefficient stored in the second storage means.
The learning means for learning the filter coefficient of the adaptive filter includes algorithms, for example, NLMS (Normalized Least Mean Square), APA (Affine Projection Algorithm), and RLS (Recursive Least Square), as also described in THE JOURNAL OF THE ACOUSTICAL SOCIETY OF JAPAN, VOL. 48, NO. 7, 1992 xe2x80x9cOutline of Adaptive Filterxe2x80x9d. Any one of the algorithms may be used.
According to the present invention, it is possible to generate an echo replica signal using a filter coefficient having a low degree of error at the time of detecting a double-talk state in a case where the double-talk detection precision is degraded and a case where the learning of a filter coefficient swings by noises.